package com.acme;

public class CheckingAccount extends AbstractAccount {

	private double overdraft;
	public CheckingAccount(double amount, double odt){
		super(amount);
		this.overdraft = odt;
	}
	
	public void deposit(double x) {
		this.balance += x;
	}
	
	
	public void withdraw(double x) {
		if ((this.balance + this.overdraft) >= x){
			this.balance -= x;
		}
	}
	
	
	public double maximumAmountToWithdraw(){
		return this.balance + this.overdraft;
	}
}
